This installation guide shows you how to configure OSCache 2.4 for use inside your JSP pages. It assumes you have downloaded the latest version, which requires at least Java 1.4 and a Servlet 2.3 container (part of J2EE 1.3). Read the Requirements for more details.

If you intend to use OSCache via the API rather than via the taglibs, these instructions do not apply. Just make sure oscache.jar and commons-logging.jar are somewhere on your application's classpath.

Extraction Steps

  1. Extract the downloaded file to a directory of your choosing.
  2. Put the oscache.jar file in the /WEB-INF/lib directory
  3. Make sure commons-logging.jar is on your classpath (normally this also means putting it in /WEB-INF/lib).
  4. Put the /etc/oscache.properties file in the /WEB-INF/classes directory and edit the properties contained within it (for example if you want disk caching, configure the persistence listener and edit the cache.path property to point to where you want the cache files stored on disk). See the Configuration Guide for further details on what options are available.
  5. Your directory structure should now look something like this:

    $WEB_APPLICATION/WEB-INF/lib/oscache.jar
    $WEB_APPLICATION/WEB-INF/classes/oscache.properties

Windows

Remember to escape any \ characters in Windows paths - e.g. if you want cache files to go in c:\cachedir, the cache.path property should be set to c:\ \cachedir.

Installation Steps

  1. Now add the appropriate JSP Tags to your JSP files and you're done.
  2. It should work properly. Tell us on the mailing list if it doesn't work in your container.

Further Information

Logging

OSCache uses Jakarta Commons Logging for logging any messages. Please see the Commons Logging documentation for details on logging configuration.

Debugging

Note that OSCache has been compiled with debugging information enabled so you should be able to use your favourite debugger to step through the source if need be.